<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>meituan</title>
    <script src="./js/vue.js"></script>
  </head>
  <body>
      <div class="submit">
          <div class="submit_header">
              <div class="header_left">
                  <router-link to="/Details">
                  <span class="iconfont fanhui"><</span>
                  <span class="hui">返回</span>
                  </router-link>
              </div>
              <div class="header_mid">
                  <span>提交订单</span>
              </div>
          </div>
          <div class="submit_mid">
              <div class="mid_first">
                  <span>『私人订制』生日宴求婚告白-工作日14小时</span>
              </div>
              <div id="app">
                  <div class="fruit_left">
                      <tr>
                          <p>数量</p>
                          <p>价格</p>
                          <p>总价</p>
                        </tr>
                  </div>
                  <div class="fruit">
                    <span v-for="(fruit,index) in fruitList">
                      <p style="margin-right: 0.4rem;">
                        <button v-on:click="fruit.number>0?fruit.number--:''">-</button>
                        {{fruit.number}}
                        <button v-on:click="fruit.number++">+</button>
                      </p>
                     <p>{{fruit.price}}</p>
                     <p>{{fruit.number * fruit.price | numFilter}}</p>
                    </span>
                  </div>
                </div>
                <script>
                  var app = new Vue({
                    el: "#app",
                    data: {
                      fruitList: [
                        { price: 2480,number:1,checked:false}
                      ],     
                      allchecked: false
                    },
                      total_num: function(){
                        var totalNum = 0;
                        this.fruitList.forEach(element =>{
                          if(element.checked){
                            totalNum = totalNum + element.number
                          }
                        });
                        return totalNum
                      },
                  })
                </script>
              </div>
              <div class="mid_fifth"></div>
              <div class="mid_sixth">
                  <div class="sixth_left">
                      <span>抵用卷</span>
                  </div>
                  <div class="sixth_right">
                      <span></span>
                  </div>
              </div>
              <div class="mid_seventh">
                  <div class="seventh_left">
                      <span>还需支付</span>
                  </div>
                  <div class="seventh_right">
                      <span>2480元</span>
                  </div>
              </div>
              <div class="mid_eight">
                  <span>免登陆直接购买</span>
              </div>
              <div class="mid_nine">
                  <div class="nineth_left">
                      <span>请输入手机号</span>
                  </div>
                  <div class="nineth_right">
                      <span>发送验证码</span>
                  </div>
              </div>
              <div class="mid_ten">
                  <span>请输入手机验证码</span>
              </div>
          
          <div class="submit_bottom">
              <div class="bottom_first">
                  <div class="bottom_left">
                      <span class="iconfont icon-tuipiao"></span>
                      <span>支持随时退款</span>
                  </div>
                  <div class="bottom_right">
                      <span class="iconfont icon-tuipiao"></span>
                      <span>支持过期自退</span>
                  </div>
              </div>
              <div class="bottom_second">
                  <span>提交订单</span>
              </div>
          </div>
      </div>
    
<style>
.fruit{float: right;}
.fruit_left{float: left; margin-left: 1.2rem;}
.submit {
    width: 100%;
    height: 35rem;
}
.submit_header{
    width: 100%;
    background-color: #06c1ae;
    height: 3rem;
}
.header_left{
    color: white;
    font-size: 1.2rem;
    margin-top: 0.3rem;
    float: left;
}
.header_left span.hui{
    color: white;
}
.header_left span.fanhui{
    color: white;
    font-size: 1.5rem;
}
.header_mid{
    color: white;
    font-size: 1.2rem;
    float: right;
    margin-right: 12rem;
    margin-top: 0.6rem;
}
.submit_mid{
    height: 10rem;
    width: 100%;
}
.mid_first{
    background-color: rgb(233, 231, 230);
    line-height: 3rem;
    font-size: 1rem;
    height: 3rem;
    width: 100%;
}
.mid_first span{
    float: left;
    margin-left: 0.3rem;
}
.mid_fifth{
    height: 1rem;
    width: 100%;
    background-color: rgb(230, 230, 230);
}
.mid_sixth{
    width: 100%;
    line-height: 2rem;
    font-size: 0.9rem;
    height: 2.8rem;
}
.sixth_left{
    float: left;
    color: gray;
    margin-left: 1.2rem;
}
.sixth_right{
   float: right;
   margin-right: 2rem;
}
.mid_seventh{
    width: 100%;
    line-height: 2rem;
    font-size: 0.9rem;
    height: 2.8rem;
}
.seventh_left{
    float: left;
    color: gray;
    margin-left: 1.2rem;
}
.seventh_right{
    float: right;
    margin-right: 1.2rem;
}
.mid_eight{
    height: 3rem;
    text-align: left;
    font-size: 1rem;
    line-height: 3rem;
    background-color: aliceblue;
}
.mid_eight span{
    margin-left: 1.2rem;
}
.mid_nine{
    width: 100%;
    line-height: 2rem;
    font-size: 0.9rem;
    height: 2.8rem;
}
.nineth_left{
    float: left;
    color: gray;
    margin-left: 1.2rem;
}
.nineth_right{
    float: right;
    margin-right: 1.2rem;
}
.mid_ten{
text-align: left;
font-size: 0.9rem;
color: gray;
height: 2.8rem;
line-height: 2rem;
margin-left: 1.2rem;
}
.submit_bottom{
    height: 6rem;
    width: 100%;
}
.bottom_first{
    height: 2rem;
    width: 100%;
    margin-top: 1rem;
    color: #6bbd00;
}
.bottom_left{
    float: left;
    margin-left: 1.2rem;
}
.bottom_right{
    float: right;
    margin-right: 3rem;
}
.bottom_second{
    margin-left: 3rem;
    line-height: 2.1rem;
    width: 80%;
    margin-top: 2rem;
    height: 2.4rem;
    color: white;
    text-align: center;
    background-color: #06c1ae;
}
a {
  text-decoration: none;
}
 
.router-link-active {
  text-decoration: none;
}
</style>
  </body>
</html>
